<?php

use Illuminate\Routing\Router;

Route::group([
    'prefix' => 'admin/LightTopic',
    'namespace' => 'Frieza\\Modules\\LightTopic\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {
    $router->get('/index/', 'LightTopicController@index');
    $router->get('/index/create', 'LightTopicController@edit');
    $router->get('/index/{id}/edit', 'LightTopicController@edit');
    $router->post('/index/save', 'LightTopicController@save');

    // 轻话题奖品
    $router->get('/{lightTopicId}/lightTopicPrize', 'LightTopicPrizeController@index'); // 轻话题奖品列表
    $router->get('/{lightTopicId}/lightTopicPrize/create', 'LightTopicPrizeController@edit'); // 编辑奖品页面
    $router->get('/{lightTopicId}/lightTopicPrize/{id}/edit', 'LightTopicPrizeController@edit'); // 编辑奖品页面
    $router->post('/{lightTopicId}/lightTopicPrize/save', 'LightTopicPrizeController@save'); // 保存修改
    $router->delete('/{lightTopicId}/lightTopicPrize/{id}', 'LightTopicPrizeController@delete'); // 删除奖品

    //回答列表
    $router->get('/answer/list', 'LightTopicContentController@index');
    $router->post('/photo/operate', 'OperateController@operate')->name('photo.operate');

    // 置顶或置底
    $router->post('/answer/isTop', 'LightTopicContentController@setTopOrBottom');

    // 从大数据提供的数据中生成轻话题
    $router->post('addLightTopic', 'LightTopicController@addLightTopic');
});